package com.ydd.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ydd.dto.YddCateDto;
import com.ydd.entity.YddCate;
import com.ydd.vo.YddCateVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author zhangxiaojun
 * @since 2023-05-14
 */
@Mapper
public interface YddCateMapper extends BaseMapper<YddCate> {
    /**
     * 分类详情
     * @param id
     * @return
     */
    @Select("select * from ydd_article where id = #{id}")
    YddCateDto getCateById(@Param("id") Long id);

    /**
     * 查询分类列表-所有
     * @return 分类列表
     */
    @Select("select * from ydd_cate")
    List<YddCate> selectCateList();

}
